package com.bac.rentmap.ad.flat.crawler.hataby;

import org.springframework.beans.factory.annotation.Required;

import com.bac.rentmap.ad.crawler.Context;
import com.bac.rentmap.ad.crawler.phone.PhoneNormalizer;
import com.bac.rentmap.ad.crawler.stepped.SteppedAdCrawler;
import com.bac.rentmap.ad.crawler.stepped.predicate.AbstractPredicateAdCrawler;
import com.bac.rentmap.ad.flat.crawler.FlatCrawledAd;
import com.bac.rentmap.ad.flat.crawler.ParsingHelper;

public class HataByAdCrawler extends AbstractPredicateAdCrawler<FlatCrawledAd> {
    private ParsingHelper parsingHelper;
    private PhoneNormalizer phoneNormalizer;

    @Override
    protected SteppedAdCrawler<FlatCrawledAd> buildSteppedAdCrawler(
            Context context) {
        HataBySteppedAdCrawler res = new HataBySteppedAdCrawler(context);
        res.setParsingHelper(parsingHelper);
        res.setPhoneNormalizer(phoneNormalizer);
        return res;
    }

    @Required
    public void setParsingHelper(ParsingHelper parsingHelper) {
        this.parsingHelper = parsingHelper;
    }

    @Required
    public void setPhoneNormalizer(PhoneNormalizer phoneNormalizer) {
        this.phoneNormalizer = phoneNormalizer;
    }
}
